package org.tourism.common;

import lombok.Getter;

@Getter
public enum ResponseCode {

    SUCCESS(0,"SUCCESS"),
    ERROR(1,"ERROR"),
    ILLEGAL_ARGUMENT(2,"ILLEGAL_ARGUMENT"),
    //不明错误，但是死不承认，在出现异常时返回给前端
    WRONG_ACTION(500, "WRONG_ACTION"),
    NEED_LOGIN(10,"NEED_LOGIN"),
    //表示用户已经登录，已登录时返回，并没有什么用的信息
    IS_LOGIN(11, "IS_LOGIN");

    private final int code;
    private final String description;

    ResponseCode(int code,String description){
        this.code = code;
        this.description = description;
    }

}

